﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CoreEx.DynamicInvoker.Tests
{
    public class GenericTestClass<T>
    {
        private List<object> _invokeResult
            = new List<object>();
        public List<object> InvokeResult
        {
            get { return _invokeResult; }
        }

        private void SaveResult(params object[] values)
        {
            _invokeResult.AddRange(values);
        }

        public void InstanceGenericMethod<T1>(T1 value)
        {
            SaveResult(value);
        }       

        public void InstanceGenericMethod<T1,T2>(T1 value1,T2 value2)
        {
            SaveResult(value1,value2);
        }

        public T InstanceGenericProperty
        {
            set
            {
                SaveResult(value);
            }
            get
            {
                return default(T);
            }
        }

        public T1 InstanceGenericMethodWithOpenReturnType<T1>()
        {
            return (T1)(object)10;
        }


    }
}
